package com.qf.controller;

import com.qf.pojo.respVo.BaseResp;
import com.qf.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired
    CommentService commentService;

    /**
     * 请求评论接口
     * @param id
     * @param page
     * @param size
     * @return
     */
    @RequestMapping("/findCourseCommentByCourseId/{id}/{page}/{size}")
    public BaseResp findCourseCommentByCourseId(@PathVariable("id")Integer id,
                                                @PathVariable("page")Integer page,
                                                @PathVariable("size")Integer size){

        return  commentService.findCourseCommentByCourseId(id,page,size);
    }
}
